/*
验证各数据类型及对应指针的所占字节大小：
系统版本： x86_64
char: 1   char_pointer:  8
short: 2   short pointer:  8
int: 4   int pointer:  8
long: 8   long pointer:  8
float: 4   float pointer:  8
double: 8   double pointer:  8
结论：不论是那种类型的指针，指针所占的字节数只根操作系统的位数相关。64位就是8个字节，32位就是4个字节
 */
#include<stdio.h>
int main(){
	printf("验证各数据类型及对应指针的所占字节大小：\n");
	printf("系统版本： x86_64\n");
	printf("char: %ld   char_pointer:  %ld\n",sizeof(char),sizeof(char *));
	printf("short: %ld   short pointer:  %ld\n",sizeof(short),sizeof(short *));
	printf("int: %ld   int pointer:  %ld\n",sizeof(int),sizeof(int *));
	printf("long: %ld   long pointer:  %ld\n",sizeof(long),sizeof(long *));
	printf("float: %ld   float pointer:  %ld\n",sizeof(float),sizeof(float *));
	printf("double: %ld   double pointer:  %ld\n",sizeof(double),sizeof(double *));
	return 0;
}

